Skip to content

Give RAW captures their own output stream and gate reads on RAWENABLE - #29

Merged
mikelangmayr merged 8 commits into
mainfrom
mike/raw-stream-output
Sep 25, 2026
Merged

mikelangmayr merged 8 commits into
mainfrom
mike/raw-stream-output

Conversation

@mikelangmayr

@mikelangmayr mikelangmayr commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor
  • Frames carry a stream name, so a pre-CDS RAW capture gets its own FITS file (<base>_<frame>_raw.fits) and its own shared-memory segment (<segment>_raw) instead of colliding with the image or resizing its stream
  • FITS datacubes are tracked per stream, so a RAW capture no longer appends into the image's cube
  • raw read refuses while RAWENABLE is 0, since the Archon captures raw alongside the frame and a controller with capture off is indistinguishable from one reporting nothing
  • raw_geometry() decides in one place whether it fell back to the config keys, and raw read warns off that
  • RAW frames carry provenance headers: RAWSEL verbatim, the MODn_TYPE of every slot it could address, and the four geometry keys
  • No slot is derived from RAWSEL: the manual documents four channels per slot over slots 5-8, the Archon GUI offers 72 selections which is eighteen per slot, and the two resolve differently on a mixed chassis
  • Documents raw retrieval in the controller commands chapter, including the module type table from the GUI source where the manual stops at 16+: Unknown
  • Verified on the emulator: the gate refuses while disabled, then enabling and exposing yields the image and RAW pair with the expected keywords
  • Emulator CI asserts the separate RAW file and segment and that the image stream geometry survives a raw read

Comment thread camerad/archon_controller.cpp Outdated

// Raw is captured with the frame, so a buffer filled before RAWENABLE was set
// reports zero and raw_geometry() falls back to inferring from the config keys
if (this->frameinfo.bufrawblocks[index] == 0 ||

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't this check in raw_geometry()?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it was. raw_geometry() now sets a from_config flag in the one place that makes the decision, and read_raw warns off that instead of re-testing the buffer fields.

constexpr int MODTYPE_ADM = 17;

// First backplane slot an AD or ADM module may occupy, which RAWSEL indexes from
constexpr int AD_SLOT_FIRST = 5;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does every AD module start at slot 5?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All ADCs are slots 5-8 only

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slots 5-8 only, so the constant holds. Comment now states the full range rather than just the first slot.

Comment thread camerad/archon_controller.cpp Outdated
@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://CaltechOpticalObservatories.github.io/camera-interface/previews/pr-29/

Built to branch gh-pages at 2026-09-24 18:41 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@mikelangmayr
mikelangmayr merged commit 0e4a705 into main Sep 25, 2026
5 checks passed
@mikelangmayr
mikelangmayr deleted the mike/raw-stream-output branch September 25, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants